<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); 

class Block_Post_View extends Core_Block {

	public function getPost() {
		if (!App::registry('post') && $this->getPostId()) {
			$post = App::object('Entity_Post');
			App::registry('post', $post);
		}
		return App::registry('post');
	}
	
	protected function _beforeRender() {
		foreach($this->getChild() as $c)
			$c->setPost($this->getPost());
	}
}